package leetcode.leetcode9;

/**
 * @author czt
 * @version 1.0
 * @since 2024/12/27
 */
public class Leetcode9 {
    public boolean isPalindrome(int x) {
        if (x < 0) {
            return false;
        }
        if (x < 10) {
            return true;
        }
        String s = x + "";
        String r = new StringBuilder(s).reverse().toString();
        return s.equals(r);
    }

}
